﻿using Furion.DatabaseAccessor;
using Microsoft.EntityFrameworkCore;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace KseCms.Core
{
    public class User : IEntity, IEntitySeedData<User>
    {
        [Key]
        [MaxLength(50)]
        public string Id { get; set; }

        [Required]
        [MaxLength(50)]
        public string Name { get; set; }

        [Required]
        [MaxLength(50)]
        public string Email { get; set; }

        [MaxLength(50)]
        public string Phone { get; set; }

        [Required]
        [MaxLength(50)]
        public string Password { get; set; }

        public IEnumerable<User> HasData(DbContext dbContext, Type dbContextLocator)
        {
            return new List<User>
            {
                new User { Id = "TestUerId", Name = "Test User", Email = "testuser@epam.com",Password="111111" }
            };
        }
    }
}
